package com.dingwen.treasure.base.constant;

/**
 * redis 使用常量
 *
 * @author dingwen
 * @date 2022/04/04
 */
public final class RedisConstant {
    /**
     * 防止重复提交使用
     */
    public static final String RE_SUBMIT_KEY = "RE_SUBMIT_KEY";

    /**
     * 简洁缓存密钥
     */
    public static final  String TERSE_CACHE_KEY = "TERSE_CACHE_KEY";

    /**
     * 系统通用配置前缀
     */
    public static final String SYS_CONFIG_PREFIX = "SYS:CONFIG:";

    /**
     * 业务规则通用配置前缀
     */
    public static final String BUSINESS_RULE_PREFIX = "BUSINESS:RULE:";


    /**
     * 通过发布订阅实现全局JVM刷新
     */
    public static final String REDIS_REFRESH_CACHE_CHANNEL_CONFIG= "refresh:config";
    public static final String REDIS_REFRESH_CACHE_CHANNEL_BUSINESS_RULE= "refresh:business:rule";


    /**
     * 验证码 key 前缀
     */
    public static final String CAPTCHA_KEY = "CAPTCHA:KEY:";

    /**
     * token key 前缀
     */
    public static final String TOKEN_KEY = "TOKEN:";

    /**
     * 登录用户 KEY 前缀
     */
    public static final String LOGIN_USER_KEY = "LOGIN:USER:";

    /**
     * 登录用户视图对象缓存 key 前缀
     */
    public static final String LOGIN_VO_KEY = "LOGIN:VO:";

    /**
     * 登录输入密码次数超话指定次数（默认 5）进行锁定指定时间（默认5分钟）
     */
    public static final String ACCOUNT_LOCK = "ACCOUNT:LOCK:";


}
